home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 2856.ZIP / FUNCKEY.PAS < prev    next >
Pascal/Delphi Source File  |  1992-05-11  |  2KB  |  81 lines

  1. unit FuncKey;
  2.  
  3. { FEBRUARY 1991                             version 3
  4.  
  5. *****************************************************************************
  6. *                                        *
  7. *    KeyTree Toolbox customizable routines
  8. *                                        *
  9. *    Copyright 1991 by Rewse Consultants Limited                *
  10. *                                        *
  11. *  The KeyTree Toolbox is issued as shareware. In case you are unaware of   *
  12. *  how the shareware system works, it is NOT 'free' software.                *
  13. *  No initial charge is made for the software, so that you can try it out   *
  14. *  without obligation. However, if you continue to use the software (and in *
  15. *  the case of the KeyTree Toolbox, use programs created using it),         *
  16. *  then you are required to pay a registration fee. To register your use of *
  17. *  the KeyTree Toolbox, we ask you to pay a miserly £30 (UK Pounds), a mere *
  18. *  fraction of the cost that you are saving in time and effort. Please send *
  19. *  your registration fee to :                                *
  20. *                                        *
  21. *    Rewse Consultants Limited                        *
  22. *    44, Horseshoe Road, Pangbourne, Reading, Berkshire RG8 7JL, UK      *
  23. ****************************************************************************}
  24.  
  25. interface
  26. uses crt;
  27.  
  28. procedure    ktPutChar(c : char);
  29. procedure    ktBackSpace;
  30. procedure    ktSeparator;
  31. procedure    ktProcessFunctionKey;
  32.  
  33. implementation
  34.  
  35. procedure    ktPutChar(c : char);
  36. begin
  37.  
  38.     write(c);    { if you are using graphics you should replace
  39.               this line and the ktBackSpace and ktSeparator
  40.                           lines with an OutText procedure call        }
  41. end;
  42.  
  43. procedure    ktBackSpace;
  44. begin
  45.  
  46.     write(#8' '#8);
  47. end;
  48.  
  49. procedure       ktSeparator;
  50. begin   write('/');
  51. end;
  52.  
  53. procedure    ktProcessFunctionKey;
  54. var    x1,x2,y1,y2,x,y : integer;
  55. begin
  56.  
  57.     x1 := Lo(WindMin);
  58.     x2 := Lo(WindMax);
  59.     y1 := Hi(WindMin);
  60.     y2 := Hi(WindMax);
  61.     x  := WhereX;
  62.     y  := WhereY;
  63.  
  64.     { place here your own routines for processing function keys.
  65.       If you are using graphics, you should replace the lines above
  66.       with procedure calls to GetViewSettings, GetX and GetY
  67.  
  68.       and the lines below with procedure calls to SetViewPort and
  69.       MoveTo.
  70.  
  71.       Some care needs to be exercised to ensure you don't get any
  72.       problems with circular references. If the code you insert
  73.       here includes calls to KeyTree then you should put the uses
  74.       clause inside the implementaion section.
  75.     }
  76.  
  77.     Window(x1,y1,x2,y2);
  78.     GotoXY(x,y);
  79. end;
  80. {$I+}
  81. end.